From 98e039072596fba3678e3f3ad142e15159f45d3d Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc kop@karlpinc.com" Date: Tue, 4 Aug 2026 00:00:38 +0000 Subject: [PATCH] Require the SIGHTING_RECORDS "MANUAL" code have a Priority of 0 --- db/schemas/codes/tables/create/sighting_records.m4 | 3 +++ doc/src/code_tables.m4 | 4 ++++ include/global_constants.m4 | 3 +++ 3 files changed, 10 insertions(+) diff --git a/db/schemas/codes/tables/create/sighting_records.m4 b/db/schemas/codes/tables/create/sighting_records.m4 index 140c1d8..c144c41 100644 --- a/db/schemas/codes/tables/create/sighting_records.m4 +++ b/db/schemas/codes/tables/create/sighting_records.m4 @@ -30,6 +30,9 @@ CREATE TABLE sighting_records ( ,priority INTEGER NOT NULL ,description TEXT NOT NULL notonlyspaces_check(`Description') + CHECK ((code = 'sdb_manual_source' + AND priority = sdb_manual_source_priority) + OR code <> 'sdb_manual_source') ); grant_priv(`SIGHTING_RECORDS') diff --git a/doc/src/code_tables.m4 b/doc/src/code_tables.m4 index 514efaa..6b12182 100644 --- a/doc/src/code_tables.m4 +++ b/doc/src/code_tables.m4 @@ -1300,6 +1300,10 @@ data present in the old MS Access database appears in this table. The SIGHTING_RECORDS.\ |SIGHTING_RECORDS.Priority| value must be unique. +The SIGHTING_RECORDS.\ |SIGHTING_RECORDS.Priority| value must be +``sdb_manual_source_priority`` when the SIGHTING_RECORDS.\ +|SIGHTING_RECORDS.Code| value is ``sdb_manual_source``. + Special Values `````````````` diff --git a/include/global_constants.m4 b/include/global_constants.m4 index 2a72b29..d687cbb 100644 --- a/include/global_constants.m4 +++ b/include/global_constants.m4 @@ -187,6 +187,9 @@ define(`sdb_sokwedb_source', `SOKWEDB') dnl Value used to manually override all other sexual swelling values define(`sdb_manual_source', `MANUAL') +dnl The priority that goes with the sdb_manual_source code +define(`sdb_manual_source_priority', `0') + dnl dnl Special sexual cycle values dnl -- 2.34.1